package com.itheima.ssm.utils;


import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

//使用spring-security进行密码加密
public class BCryptPasswordEncoderUtils {
    public static BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();

    public static String encodePassword(String password) {
        return bCryptPasswordEncoder.encode(password);
    }

    public static void main(String[] args) {
        String abc = "123";
        String pwd = encodePassword(abc);
        System.out.println(pwd);
    }
}
